#include <iostream>
#include <vector>
using namespace std;

vector<int>::iterator func(vector<int>::iterator b, vector<int>::iterator e,
                           int i) {
  while (b != e) {
    if (*b != i)
      b++;
    else {
      return b;
    }
  }
  return e;
}

int main(int argc, char const *argv[]) {
  /* code */
  vector<int> v = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  int find = 51;
  if (func(v.begin(), v.end(), find) != v.end()) {
    cout << "We have found it" << endl;
  } else
    cout << "Sorry,there is no " << find << " in the range" << endl;
  return 0;
}
